/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.promocion.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ctrosch
 */
@Embeddable
public class ItemPromocionPK implements Serializable {

    private Integer nroPromocion;
    private Integer orden;

    public Integer getNroPromocion() {
        return nroPromocion;
    }

    public void setNroPromocion(Integer nroPromocion) {
        this.nroPromocion = nroPromocion;
    }

    public Integer getOrden() {
        return orden;
    }

    public void setOrden(Integer orden) {
        this.orden = orden;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ItemPromocionPK other = (ItemPromocionPK) obj;
        if (this.nroPromocion != other.nroPromocion && (this.nroPromocion == null || !this.nroPromocion.equals(other.nroPromocion))) {
            return false;
        }
        if (this.orden != other.orden && (this.orden == null || !this.orden.equals(other.orden))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + (this.nroPromocion != null ? this.nroPromocion.hashCode() : 0);
        hash = 59 * hash + (this.orden != null ? this.orden.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "ItemPromocionPK{" + "nroPromocion=" + nroPromocion + "orden=" + orden + '}';
    }

    
}
